//
//  IntegralTableView.m
//  Base_App
//
//  Created by Yutian Duan on 2019/6/3.
//  Copyright © 2019年 Wanwin. All rights reserved.
//

#import "IntegralTableView.h"
#import "IntegralListCell.h"

@implementation IntegralTableView

- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
  self = [super initWithFrame:frame style:style];
  if (self) {
    self.rowHeight = (ScreenWidth - 40) * ITEMPRO + 20;
  }
  return self;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  return self.data.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
  static NSString *identify = @"IntegarlCell";
  
  IntegralListCell *cell = [tableView dequeueReusableCellWithIdentifier:identify];
  if (!cell) {
    cell = [[IntegralListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identify];
  }
  cell.model = self.data[indexPath.row];
  return cell;
  
}



@end
